package cn.hh.bean.enumbean;

/**
 * @Author huangh
 * @date 2021/09/28
 * @Description:
 */

public enum  ResultCodeEnum {
    /*成功*/
    SUCCESS( 200, "SUCCESS" ),
    /*失败*/
    FAILURE( 4000, "FAILURE" ),
    /*未认证（签名错误、token错误）*/
    UNAUTHORIZED( 4001, "未认证或Token失效" ),
    /*未通过认证*/
    USER_UNAUTHORIZED( 4002, "用户名或密码不正确" ),
    /*接口不存在*/
    NOT_FOUND( 4004, "接口不存在" ),
    /*服务器内部错误*/
    INTERNAL_SERVER_ERROR( 5000, "服务器内部错误" );

    private int code;
    private String message;

    ResultCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
